package com.mercury.pattern._15_iterator;

import java.util.Iterator;

/**
 *
 */
public class ComputerCollege implements College {
    //computerCollege中存储的是数组
    Department[] depts;

    public ComputerCollege(Department[] depts) {
        this.depts = depts;
    }

    @Override
    public Iterator createIterator() {
        return new ComputerIterator(depts);
    }
}